<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateCartsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('carts', function (Blueprint $table) {
            $table->id();
            $table->integer('partition_table_record_id')->unsigned()->index()->comment('开台记录ID');
            $table->uuid('op_uuid')->index()->comment('操作批次');//可排序
            $table->integer('product_online_id')->unsigned()->index()->comment('菜品上架ID');
            $table->integer('productspec_online_id')->unsigned()->index()->comment('菜品上架规格ID');
            $table->integer('qty')->unsigned()->comment('数量');
            $table->string('op',10)->comment('操作:init,add,del');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {

    }
}
